package com.schoolET.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户之间的聊天内容
 * </p>
 *
 * @author le
 * @since 2024-06-04
 */
@Getter
@Setter
@ApiModel(value = "Chat对象", description = "用户之间的聊天内容")
public class Chat implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("聊天id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("消息来自于哪个用户")
    private Integer fromWechatId;

    @ApiModelProperty("消息内容")
    private String messageContent;

    @ApiModelProperty("消息发给哪个用户")
    private Integer toWechatId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("有效字段")
    private Integer flag;
}
